PAGE 1

7.1 + 7.2 Systems of First Order Linear Eqs

solve more than one equation at a time

\[ \begin{cases} x_1'(t) = 2x_1(t) + 5x_2(t) \\ x_2'(t) = -x_1(t) + x_2(t) \end{cases} \]\[ \Rightarrow \begin{cases} x_1(t) = ? \\ x_2(t) = ? \end{cases} \]

(this is a coupled system — they depend on each other)

Homogeneous Systems

the system above is homogeneous because there are no other functions of \( t \) or other constants on the right side

Nonhomogeneous Systems

this system is nonhomogeneous

\[ \begin{cases} x_1'(t) = 2x_1(t) + 5x_2(t) + \underline{\cos(t)} \\ x_2'(t) = -x_1(t) + x_2(t) + \underline{5} \end{cases} \]

an \( n \)th-order differential equation can be written as a system of \( n \) first-order eqs.

PAGE 2

Example

\[ y'' + \frac{1}{2}y' + 2y = \sin t \]

this is a 2nd-order eq.

\( \rightarrow \) equivalent to sys of two 1st-order eqs.

let \( x_1 = y \)\( x_2 = y' \)

write first-order eqs for these

\[ \begin{cases} x_1' = x_2 \\ x_2' = -2x_1 - \frac{1}{2}x_2 + \sin t \end{cases} \]
\[ y'' = -\frac{1}{2}y' - 2y + \sin t \]\[ \begin{matrix} \uparrow & \uparrow & \uparrow \\ x_2' & x_2 & x_1 \end{matrix} \]
PAGE 3

Example (Project 1)

\[ u'' + ku + \epsilon u^3 = 0 \]

In Matlab, we represented it as a system in function file.

Let:

\[ \begin{aligned} x_1 &= u \\ x_2 &= u' \end{aligned} \]
\[ \begin{cases} x_1' = x_2 \\ x_2' = -kx_1 - \epsilon(x_1)^3 \end{cases} \quad \text{nonlinear sys.} \]
PAGE 4

Example

\[ y^{(4)} - y = 0 \]

4th-order \(\rightarrow\) 4 first-order eqs.

Let:

\[ \begin{aligned} x_1 &= y \\ x_2 &= y' \\ x_3 &= y'' \\ x_4 &= y''' \end{aligned} \]

\(\Rightarrow\) lower order deriv. (0th order)

step up in deriv.

until the \((n-1)^{th}\) deriv.

\[ \begin{cases} x_1' = x_2 \\ x_2' = x_3 \\ x_3' = x_4 \\ x_4' = x_1 \end{cases} \]
\[ x_4' = (y''')' = y^{(4)} \]
From DE, \[ y^{(4)} = y \]

\(\uparrow x_1\)

\(x_4' = x_1 \rightarrow \underline{DE}\)

PAGE 5

Converting Systems to $n$th-order Differential Equations

Turn sys back to $n$th-order DE, then solve.

Example

\( x_1' = -2x_1 + x_2 \quad \text{--- (1)} \)

\( x_2' = x_1 - 2x_2 \quad \text{--- (2)} \)

What is the equivalent 2nd-order DE?

Solve either for one variable.

From (1): \( x_2 = x_1' + 2x_1 \)

\( x_2' = x_1'' + 2x_1' \)

Solve for the one that appears least often.

Sub these into (2):

\( x_1'' + 2x_1' = x_1 - 2(x_1' + 2x_1) \quad \text{no } x_2 \text{ any more} \)

\( x_1'' + 4x_1' + 3x_1 = 0 \)

\( x_1(t) = C_1 e^{-t} + C_2 e^{-3t} \)

To find \( x_2 \), use (1).

PAGE 6

\( x_2 = x_1' + 2x_1 \)

\( = -C_1 e^{-t} - 3C_2 e^{-3t} + 2(C_1 e^{-t} + C_2 e^{-3t}) \)

\( x_2 = C_1 e^{-t} - C_2 e^{-3t} \)


\( x_1 = C_1 e^{-t} + C_2 e^{-3t} \)

Initial Conditions (IC's)

\( x_1(0) = 1, \quad x_2(0) = 2 \)

Then:

\( x_1 = \frac{3}{2} e^{-t} - \frac{1}{2} e^{-3t} \)

\( x_2 = \frac{3}{2} e^{-t} + \frac{1}{2} e^{-3t} \)

If we graph \( x_1 \) vs \( x_2 \), we get a phase plot.

Phase plot on x1-x2 axes showing a trajectory starting at (1,2) and moving toward the origin.
PAGE 7

Solving Systems by Transforming into Higher-Order Equations

Solving systems by transforming into higher-order eqs is not hard but can be cumbersome.

→ Borrow concepts from linear algebra to speed things up.

Review of Matrices

\[ A = \begin{bmatrix} 1 & 4 \\ -2 & 3 \end{bmatrix} \]
\[ \begin{pmatrix} 1 & 4 \\ -2 & 3 \end{pmatrix} \text{ book notation} \]
\[ B = \begin{bmatrix} 3 & -1 \\ 6 & 2 \end{bmatrix} \]
\[ C = \begin{bmatrix} 3 \\ -1 \end{bmatrix} \]

We can add/subtract matrices if they are of the same size.

PAGE 8
\[ A + B = \begin{bmatrix} 4 & 3 \\ 4 & 5 \end{bmatrix} \]
\[ A - B = \begin{bmatrix} -2 & 5 \\ -8 & 1 \end{bmatrix} \]
\[ 3A = \begin{bmatrix} 3 & 12 \\ -6 & 9 \end{bmatrix} \]
\[ 2A + 3B = \begin{bmatrix} 11 & 5 \\ 14 & 12 \end{bmatrix} \]

Matrix Multiplication

Multiply matrices is only possible if inner dimensions match.

\[ A = \begin{bmatrix} 1 & 4 \\ -2 & 3 \end{bmatrix} \]

\( 2 \times 2 \)

rows × columns

\[ B = \begin{bmatrix} 3 & -1 \\ 6 & 2 \end{bmatrix} \]

\( 2 \times 2 \)

\[ C = \begin{bmatrix} 3 \\ -1 \end{bmatrix} \]

\( 2 \times 1 \)

PAGE 9

Matrix Multiplication and Properties

Valid Multiplication: \( AC \)

Matrix \( A \) is \( 2 \times 2 \) and Matrix \( C \) is \( 2 \times 1 \).

Inner dimensions must match:

\( 2 \times \mathbf{2} \) and \( \mathbf{2} \times 1 \) → Match

Invalid Multiplication: \( CA \)

Matrix \( C \) is \( 2 \times 1 \) and Matrix \( A \) is \( 2 \times 2 \).

Inner dimensions don't match:

\( 2 \times \mathbf{1} \) and \( \mathbf{2} \times 2 \) → Meaningless

(Operation is NOT allowed)

Example: Calculating \( AC \)

\[ AC = \begin{bmatrix} 1 & 4 \\ -2 & 3 \end{bmatrix}_{2 \times 2} \begin{bmatrix} 3 \\ -1 \end{bmatrix}_{2 \times 1} = \begin{bmatrix} 1 \cdot 3 + 4 \cdot (-1) \\ -2 \cdot 3 + 3 \cdot (-1) \end{bmatrix}_{2 \times 1} = \begin{bmatrix} -1 \\ -9 \end{bmatrix} \]

The resulting size of \( AC \) is \( 2 \times 1 \).

Example: Calculating \( AB \)

\[ AB = \begin{bmatrix} 1 & 4 \\ -2 & 3 \end{bmatrix}_{2 \times 2} \begin{bmatrix} 3 & -1 \\ 6 & 2 \end{bmatrix}_{2 \times 2} = \begin{bmatrix} 27 & 7 \\ 12 & 8 \end{bmatrix}_{2 \times 2} \]

Commutative Property

\( AB = BA \) ? NO.

In general, \( AB \neq BA \).

PAGE 10

Systems of Differential Equations as Matrix Equations

We can express systems of DEs as matrix eqs.

Example

Consider the system:

\[ \begin{aligned} x_1' &= -2x_1 + x_2 \\ x_2' &= x_1 - 2x_2 \end{aligned} \]

This can be written in matrix form as:

\[ \begin{bmatrix} x_1 \\ x_2 \end{bmatrix}' = \begin{bmatrix} -2 & 1 \\ 1 & -2 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} = \begin{bmatrix} -2x_1 + x_2 \\ x_1 - 2x_2 \end{bmatrix} \]

Vector Notation

Let:

\[ \vec{x} = \begin{bmatrix} x_1 \\ x_2 \end{bmatrix}, \quad A = \begin{bmatrix} -2 & 1 \\ 1 & -2 \end{bmatrix} \]

Then the system becomes:

\[ \vec{x}' = A \vec{x} \]
PAGE 11

Example: Converting a Higher-Order ODE to a Matrix Equation

Page 11

Example

Given the differential equation:

\[ y^{(4)} - y = 0 \]

Write as a matrix equation.

Step 1: Define State Variables

Variable Definitions:

  • \( x_1 = y \)
  • \( x_2 = y' \)
  • \( x_3 = y'' \)
  • \( x_4 = y''' \)

System of First-Order Equations:

  • \( x_1' = x_2 \)
  • \( x_2' = x_3 \)
  • \( x_3' = x_4 \)
  • \( x_4' = x_1 \)

Step 2: Formulate the Matrix System

Expressing the system in terms of linear combinations of state variables:

\[ \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \end{bmatrix}' = \begin{bmatrix} 0x_1 + x_2 + 0x_3 + 0x_4 \\ 0x_1 + 0x_2 + x_3 + 0x_4 \\ 0x_1 + 0x_2 + 0x_3 + x_4 \\ x_1 + 0x_2 + 0x_3 + 0x_4 \end{bmatrix} \]

Final matrix equation form \( \mathbf{x}' = A\mathbf{x} \):

\[ \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \end{bmatrix}' = \begin{bmatrix} 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ 1 & 0 & 0 & 0 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \end{bmatrix} \]